<div class="col-lg-4 col-md-6 col-sm-6">
  <div class="teacher-item no-shadow">
    <div class="teacher-top">
      <a class="teacher-img" href="{{ path('user_show', {id:teacher.id}) }}">
        <img class="avatar-lg" src="{{ filepath(teacher.largeAvatar, 'avatar.png') }}" alt="">
      </a>
      <div class="title">
        <a class="link-dark" href="{{ path('user_show', {id:teacher.id}) }}">{{ teacher.nickname }}</a>
        {% if 'headTeacher' in member.role %}
          <i class="es-icon es-icon-school color-primary" data-toggle="tooltip" data-placement="top" title="" data-original-title="班主任"></i>
        {% elseif 'teacher' in member.role %}
          <i class="es-icon es-icon-school color-danger" data-toggle="tooltip" data-placement="top" title="" data-original-title="教师"></i>
        {% elseif 'assistant' in member.role %}
          <i class="es-icon es-icon-school color-info" data-toggle="tooltip" data-placement="top" title="" data-original-title="助教"></i>
        {% endif %}

      </div>
      <div class="position">
        {% if teacher.title %}
          {{ teacher.title }}
        {% else %}
          暂无头衔
        {% endif %}
      </div>
    </div>
    <div class="teacher-bottom">
      <div class="about">
        {% if profiles[teacher.id].about %}
          {{ profiles[teacher.id].about|plain_text(30) }}
        {% else %}
          暂无简介
        {% endif %}
      </div>
      <div class="metas">
        {% if not app.user or (teacher.id != app.user.id) %}
          <a class="btn btn-primary btn-sm follow-btn" href="javascript:;" data-url="{{ path('user_follow', {id:teacher.id}) }}" {% if isFollowed %} style="display:none;"{% endif %} data-loggedin={% if app.user and app.user.isLogin() %}"1"{% else %}"0"{% endif %}>关注</a>
          <a class="btn btn-default btn-sm unfollow-btn" href="javascript:;" data-url="{{ path('user_unfollow', {id:teacher.id}) }}" {% if not isFollowed %} style="display:none;" {% endif %}>已关注</a>
          <a class="btn btn-default btn-sm text-center" data-toggle="modal" data-target="#modal" data-url="{{path('message_create', {toId:teacher.id})}}">私信</a>
        {% endif %}
      </div>
    </div>
  </div>
</div>